package com.wskj.library.dao.impl;

import com.wskj.library.pojo.*;

import com.wskj.library.dao.*;

import java.util.List;

/**
 * bookCategory dao接口类实现类
 * 2018-03-22 T148
 */ 
public class BookCategoryDaoImpl extends BaseDao implements BookCategoryDao{

	 @Override
	 public int addBookCategory(BookCategory  bookCategory){
		 String sql="insert into bookCategory  values  ()";
		 Object[] params= {};
		 return super.executeUpdate(sql, params);
	 }
	 @Override
	 public int deleteById(int id){
		 String sql="delete from bookCategory  where cid=? ";
		 Object[] params= {id};
		 return super.executeUpdate(sql, params);
	 }
	 @Override
	 public int updateBookCategory(BookCategory bookCategory){
		 String sql="update bookCategory set ";
		 Object[] params= {};
		 return super.executeUpdate(sql, params);
	 }
	 @Override
	 public BookCategory getBookCategoryById(int id){
		 String sql="select * from bookCategory where cid=? ";
		 Object[] params= {id};
		 return super.queryOne(sql, params,BookCategory.class);
	 }
	 @Override
	 public  List<BookCategory>  getAllBookCategorys(){
		 String sql="select * from bookCategory";
		 Object[] params= null;
		 return super.queryAll(sql, params, BookCategory.class);
	 }
}

